<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>grid 方案</title>
  <style>
    html, body, .container {
      height: 100%;
    }
    .container {
      display: grid;
      grid-template-columns: 100%;
      grid-template-rows: 200px auto 200px;
    }

    .header {
      background: #bfa;
    }

    .middle {
      background: #ddf;
    }

    .footer {
      background: #e7f;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header"></div>
    <div class="middle"></div>
    <div class="footer"></div>
  </div>
</body>
</html>

